package com.obixlabs.security.credentialsstore.services;

import java.rmi.RemoteException;
import java.util.Set;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import com.obixlabs.security.credentialsstore.exception.EntryNotFoundException;
import com.obixlabs.security.credentialsstore.model.BaseUser;
import com.obixlabs.security.credentialsstore.model.ObixGroup;
import com.obixlabs.security.credentialsstore.model.ObixGroups;

@WebService(name=GroupManagementService.SERVICE_NAME, 
			targetNamespace=SecurityServiceConstants.SECURITY_SERVICES_TARGET_NAMESPACE)
public interface GroupManagementService extends SecurityService
{
	String SERVICE_NAME = "GroupManagementService";
	
	@WebMethod(operationName="getGroupMembers")
	Set<BaseUser> getGroupMembers(ObixGroup group) 
					throws 	RemoteException, EntryNotFoundException;
	
	@WebMethod(operationName="getAllGroups")
	ObixGroups 	getAllGroups()
				throws RemoteException;
		
	@WebMethod(operationName="saveGroup")
	ObixGroup saveGroup(@WebParam ObixGroup group)
				throws RemoteException;
	
	@WebMethod(operationName="deleteGroup")
	void deleteGroup(@WebParam ObixGroup group)
				throws RemoteException;

	@WebMethod(operationName="getGroup")
	ObixGroup getGroup(@WebParam String groupName)
				throws RemoteException;
	
}